home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / necko / nsIHttpEventSink.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  3KB  |  116 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIHttpEventSink.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIHttpEventSink_h__
  6. #define __gen_nsIHttpEventSink_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIChannel; /* forward declaration */
  18.  
  19. class nsIHttpChannel; /* forward declaration */
  20.  
  21. class nsIURI; /* forward declaration */
  22.  
  23.  
  24. /* starting interface:    nsIHttpEventSink */
  25. #define NS_IHTTPEVENTSINK_IID_STR "9475a6af-6352-4251-90f9-d65b1cd2ea15"
  26.  
  27. #define NS_IHTTPEVENTSINK_IID \
  28.   {0x9475a6af, 0x6352, 0x4251, \
  29.     { 0x90, 0xf9, 0xd6, 0x5b, 0x1c, 0xd2, 0xea, 0x15 }}
  30.  
  31. /**
  32.  * nsIHttpEventSink
  33.  *
  34.  * Implement this interface to receive control over various HTTP events.  The
  35.  * HTTP channel will try to get this interface from its notificationCallbacks
  36.  * attribute, and if it doesn't find it there it will look for it from its
  37.  * loadGroup's notificationCallbacks attribute.
  38.  *
  39.  * These methods are called before onStartRequest, and should be handled
  40.  * SYNCHRONOUSLY.
  41.  *
  42.  * @deprecated Newly written code should use nsIChannelEventSink instead of this
  43.  * interface.
  44.  */
  45. class NS_NO_VTABLE nsIHttpEventSink : public nsISupports {
  46.  public: 
  47.  
  48.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IHTTPEVENTSINK_IID)
  49.  
  50.   /**
  51.      * Called when a redirect occurs due to a HTTP response like 302.  The
  52.      * redirection may be to a non-http channel.
  53.      *
  54.      * @return failure cancels redirect
  55.      */
  56.   /* void onRedirect (in nsIHttpChannel httpChannel, in nsIChannel newChannel); */
  57.   NS_IMETHOD OnRedirect(nsIHttpChannel *httpChannel, nsIChannel *newChannel) = 0;
  58.  
  59. };
  60.  
  61. /* Use this macro when declaring classes that implement this interface. */
  62. #define NS_DECL_NSIHTTPEVENTSINK \
  63.   NS_IMETHOD OnRedirect(nsIHttpChannel *httpChannel, nsIChannel *newChannel); 
  64.  
  65. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  66. #define NS_FORWARD_NSIHTTPEVENTSINK(_to) \
  67.   NS_IMETHOD OnRedirect(nsIHttpChannel *httpChannel, nsIChannel *newChannel) { return _to OnRedirect(httpChannel, newChannel); } 
  68.  
  69. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  70. #define NS_FORWARD_SAFE_NSIHTTPEVENTSINK(_to) \
  71.   NS_IMETHOD OnRedirect(nsIHttpChannel *httpChannel, nsIChannel *newChannel) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnRedirect(httpChannel, newChannel); } 
  72.  
  73. #if 0
  74. /* Use the code below as a template for the implementation class for this interface. */
  75.  
  76. /* Header file */
  77. class nsHttpEventSink : public nsIHttpEventSink
  78. {
  79. public:
  80.   NS_DECL_ISUPPORTS
  81.   NS_DECL_NSIHTTPEVENTSINK
  82.  
  83.   nsHttpEventSink();
  84.  
  85. private:
  86.   ~nsHttpEventSink();
  87.  
  88. protected:
  89.   /* additional members */
  90. };
  91.  
  92. /* Implementation file */
  93. NS_IMPL_ISUPPORTS1(nsHttpEventSink, nsIHttpEventSink)
  94.  
  95. nsHttpEventSink::nsHttpEventSink()
  96. {
  97.   /* member initializers and constructor code */
  98. }
  99.  
  100. nsHttpEventSink::~nsHttpEventSink()
  101. {
  102.   /* destructor code */
  103. }
  104.  
  105. /* void onRedirect (in nsIHttpChannel httpChannel, in nsIChannel newChannel); */
  106. NS_IMETHODIMP nsHttpEventSink::OnRedirect(nsIHttpChannel *httpChannel, nsIChannel *newChannel)
  107. {
  108.     return NS_ERROR_NOT_IMPLEMENTED;
  109. }
  110.  
  111. /* End of implementation class template. */
  112. #endif
  113.  
  114.  
  115. #endif /* __gen_nsIHttpEventSink_h__ */
  116.